#include"Camera.h"
#include<iostream>
#include<opencv4/opencv2/opencv.hpp>

using namespace std;
using namespace cv;
using namespace hnurm;

int main()
{
    cout<<"a test"<<endl;
    HKcam cap;

    if(cap.OpenCam())
    {
        cout<<"success"<<endl;
    }
    else
    {
        cout<<"failed"<<endl;
        return -1;
    }

    ImgInfo img;

    while(1)
    {
        cap.GetFlame(img);
        
        if(img.frame.cols)
        {
            cout<<img.frame.cols<<" "<<img.frame.rows<<endl;
            imshow("test",img.frame);
        }

        if(waitKey(1)=='q')
        {
            cout<<"quit"<<endl;
            cap.CloseCam();
            return 0;
        }
    }
}